-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Containerized auto-generation #829
Containerized auto-generation #829
Conversation
699c4bb
to
77299af
Compare
77299af
to
101f69c
Compare
/assign @zvonkok @ArangoGutierrez |
ping @mythi, would you have time to look at this? 😊 A lot of files changed but basically only the first patch is interesting |
101f69c
to
585dad5
Compare
And what is the use case of this? maybe add some context to the PR description, about the auto-generator tool. |
585dad5
to
856d9f6
Compare
Run code auto-generation inside a container instead of the host system. Our auto-generation depends on specific versions of a multitude of tools (like k8s code-generator, controller-gen, protoc, mockery etc). This made it really awkward (and error-prone) to run in the host environment, especially if/when you needed different versions of those tools for other projects. Making it even more unwieldy, the required versions of tools were not neatly documented anywhere (except for git commits, perhaps). With this patch we have a "fixed environment", as we build a special auto-generate-builder container which has correct versions of all the dependencies. Using the container makes auto-generation easy to run anywhere, independent of the host system, giving reproducibility and reliability. Also, the patch moves the auto-generation steps out from the makefile into a separate script, making the makefile cleaner and the script easier to maintain.
In order to be able to run it on Go v1.18.
Refresh auto-generated files using the new conainerized approach.
856d9f6
to
ac3030c
Compare
Oh, I thought it was so obvious 😅 I added a longer commit message (copy-pasted to the PR description). I hope it is easier to understand now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, marquiz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Run code auto-generation inside a container instead of the host system.
Our auto-generation depends on specific versions of a multitude of tools
(like k8s code-generator, controller-gen, protoc, mockery etc). This
made it really awkward (and error-prone) to run in the host environment,
especially if/when you needed different versions of those tools for
other projects. Making it even more unwieldy, the required versions of
tools were not neatly documented anywhere (except for git commits,
perhaps).
With this patch we have a "fixed environment", as we build a special
auto-generate-builder container which has correct versions of all the
dependencies. Using the container makes auto-generation easy to run
anywhere, independent of the host system, giving reproducibility and
reliability. Also, the patch moves the auto-generation steps out from
the makefile into a separate script, making the makefile cleaner and the
script easier to maintain.